<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<div id="commonpager">
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=1;this.document.getElementById('submitpager').click()">1</a>&nbsp; 
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=2;this.document.getElementById('submitpager').click()">2</a>&nbsp; 
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=3;this.document.getElementById('submitpager').click()">3</a>&nbsp; 
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=4;this.document.getElementById('submitpager').click()">4</a>&nbsp; 
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=5;this.document.getElementById('submitpager').click()">5</a>&nbsp; 
<a href="#" onclick="this.document.getElementById('commonpagerinput').value=6;this.document.getElementById('submitpager').click()">6</a>&nbsp; 
....
  <input type="text" id="commonpagerinput" size="3" />
  &nbsp;
  <label for="Submit"></label>
  <input type="button"  value="转到" id="submitpager"  onclick="thisloc=this.document.location + '';if(thisloc.indexOf('?')==-1)thisloc += '?';pagevar= '&page=' +this.document.getElementById('commonpagerinput').value;if(/page=[^&]+/.exec(thisloc)!=null){thisloc=thisloc.replace(/page=[^&]+/, pagevar);}else thisloc+=pagevar; this.document.location.href=thisloc;"/>
</div>